<?php 
	// session_start()

 ?>
<div class="hd-navbar">
	<div class="hd-container">
		<div class="logo">
			<img src="logo.jpg" width="60px">
		</div>
		<ul class="navbar-left">
			<li>
				<a href="/index/index.php">首页</a>
			</li>
		</ul>
		<form class="search">
			<div class="search-box">
				<input type="text" class="search" placeholder="h5c3、javascript、php">
				<button>搜索</button>
			</div>
		</form>
		<ul class="navbar-right">
			<li>
				<?php if (isset($user)): ?>
					<li>
						<a href="javascript:;">
							<img src="<?php echo $user['avatar'] ?>" class="avatar">
						</a>
					</li>
					<li>
						<a href="/index/person.php?id=<?php echo $user['id']; ?>">个人主页</a>
					</li>
				<?php endif ?>
			</li>
		</ul>
	</div>
</div>